/*
 * XML Type:  SimplePathNode
 * Namespace: http:///org/isistan/flabot/coremodel.ecore
 * Java type: org.isistan.flabot.coremodelEcore.SimplePathNode
 *
 * Automatically generated - do not modify.
 */
package org.isistan.flabot.coremodelEcore.impl;
/**
 * An XML SimplePathNode(@http:///org/isistan/flabot/coremodel.ecore).
 *
 * This is a complex type.
 */
public class SimplePathNodeImpl extends org.isistan.flabot.coremodelEcore.impl.PathNodeImpl implements org.isistan.flabot.coremodelEcore.SimplePathNode
{
    private static final long serialVersionUID = 1L;
    
    public SimplePathNodeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName MAP$0 = 
        new javax.xml.namespace.QName("", "map");
    private static final javax.xml.namespace.QName NAME$2 = 
        new javax.xml.namespace.QName("", "name");
    private static final javax.xml.namespace.QName MAP2$4 = 
        new javax.xml.namespace.QName("", "map");
    
    
    /**
     * Gets array of all "map" elements
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap[] getMapArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(MAP2$4, targetList);
            org.isistan.flabot.coremodelEcore.UseCaseMap[] result = new org.isistan.flabot.coremodelEcore.UseCaseMap[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "map" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap getMapArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().find_element_user(MAP2$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "map" element
     */
    public int sizeOfMapArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(MAP2$4);
        }
    }
    
    /**
     * Sets array of all "map" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setMapArray(org.isistan.flabot.coremodelEcore.UseCaseMap[] mapArray)
    {
        check_orphaned();
        arraySetterHelper(mapArray, MAP2$4);
    }
    
    /**
     * Sets ith "map" element
     */
    public void setMapArray(int i, org.isistan.flabot.coremodelEcore.UseCaseMap map)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().find_element_user(MAP2$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(map);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "map" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap insertNewMap(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().insert_element_user(MAP2$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "map" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap addNewMap()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().add_element_user(MAP2$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "map" element
     */
    public void removeMap(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(MAP2$4, i);
        }
    }
    
    /**
     * Gets the "name" attribute
     */
    public java.lang.String getName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "name" attribute
     */
    public org.apache.xmlbeans.XmlString xgetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$2);
            return target;
        }
    }
    
    /**
     * True if has "name" attribute
     */
    public boolean isSetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(NAME$2) != null;
        }
    }
    
    /**
     * Sets the "name" attribute
     */
    public void setName(java.lang.String name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$2);
            }
            target.setStringValue(name);
        }
    }
    
    /**
     * Sets (as xml) the "name" attribute
     */
    public void xsetName(org.apache.xmlbeans.XmlString name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$2);
            }
            target.set(name);
        }
    }
    
    /**
     * Unsets the "name" attribute
     */
    public void unsetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(NAME$2);
        }
    }
    
    /**
     * Gets the "map" attribute
     */
    public java.lang.String getMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MAP2$4);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "map" attribute
     */
    public org.apache.xmlbeans.XmlString xgetMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(MAP2$4);
            return target;
        }
    }
    
    /**
     * True if has "map" attribute
     */
    public boolean isSetMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(MAP2$4) != null;
        }
    }
    
    /**
     * Sets the "map" attribute
     */
    public void setMap2(java.lang.String map2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MAP2$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MAP2$4);
            }
            target.setStringValue(map2);
        }
    }
    
    /**
     * Sets (as xml) the "map" attribute
     */
    public void xsetMap2(org.apache.xmlbeans.XmlString map2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(MAP2$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(MAP2$4);
            }
            target.set(map2);
        }
    }
    
    /**
     * Unsets the "map" attribute
     */
    public void unsetMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(MAP2$4);
        }
    }
}
